package com.liuche.homechat.common.common.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * @author：liuche
 * @Date：2024年06月02日 14:50
 * @Description：
 */
@Component
@Slf4j
@RocketMQMessageListener(topic = "a_topic", consumerGroup = "homechat-consumer")
public class RocketMQConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        // 处理消息的逻辑
        log.info("Received message--> 【{}】", message);
    }
}
